﻿#ifndef JMSTEMPLATE_H
#define JMSTEMPLATE_H

#include <activemq/cmsutil/cmstemplate.h>
#include <cms/ExceptionListener.h>
#include <activemq/library/ActiveMQCPP.h>
#include <decaf/lang/Thread.h>
#include <decaf/lang/Runnable.h>
#include <decaf/util/concurrent/CountDownLatch.h>
#include <decaf/lang/Integer.h>
#include <decaf/lang/Long.h>
#include <decaf/lang/System.h>
#include <decaf/lang/exceptions/RuntimeException.h>
#include <activemq/core/ActiveMQConnectionFactory.h>
#include <activemq/util/Config.h>
#include <cms/Connection.h>
#include <cms/Session.h>
#include <cms/TextMessage.h>
#include <cms/BytesMessage.h>
#include <cms/MapMessage.h>
#include <activemq/cmsutil/CmsTemplate.h>
#include <cms/MessageListener.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <memory>
#include <log4qt/logger.h>

class JmsTemplate :
	public activemq::cmsutil::CmsTemplate
{
private:
	cms::Connection* jmsconnection;
	Log4Qt::Logger* log;
public:

	JmsTemplate( cms::Connection* connection = NULL, cms::ConnectionFactory* connectionFactory = NULL);
	virtual cms::Connection* createConnection();
	virtual ~JmsTemplate() throw();
	cms::Connection* getConnection() const {return jmsconnection;};
};
#endif